|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.doclinx.ftxml.CatalogSearch
This class is the API for the search and retrieval component of TeraXML. The class accesses a catalog created and managed by the CatalogManager class. The catalog can be searched using a boolean query language with results being organized by several sort criteria.
CatalogManager
Field Summary | |
boolean |
bObsolete
Set if the CatalogSearch handle has been notified of DB update. |
static int |
FOLD_DIGIT
Folding control bits for numerics and/or latin characters. |
static int |
FOLD_LATIN
CatXSSearch mode setting. |
static int |
MODE_ALTWORD
Include lookup word in alt. lookup str |
static int |
MODE_ANDORMODE
Search Modes for catXSSearch method mode parameter
Search Operation. |
static int |
MODE_BOTH
Search both PRIMARY and UPDATE databases. |
static int |
MODE_FOLD_DIGIT
Search Modes for catXSSearch method mode parameter.
|
static int |
MODE_FOLD_LATIN
Search Modes for catXSSearch method mode parameter. |
static int |
MODE_FUZZY
Perform fuzzy searches (sounds like). |
static int |
MODE_NODEINFO
Search Mode for catXSSearch method mode parameter.
|
static int |
MODE_NOXPATHOK
Search Modes for catXSSearch method mode parameter
Enable/Disable error return when xpath not found. |
static int |
MODE_PHRASES
Search Mode for catXSSearch method mode parameter.
|
static int |
MODE_PLURAL
Search for plurals and possessives. |
static int |
MODE_PRM
Search only PRIMARY database. |
static int |
MODE_RELEVANCY
Search Modes for catXSSearch method mode parameter
Search Order. |
static int |
MODE_STEM
Perform stemmed searches (word folding) |
static int |
MODE_SUBDELS
Search Modes for catXSGetDocMax method mode parameter.
|
static int |
MODE_THES
Use theasurus to expand search terms. |
static int |
MODE_UPD
Search only UPDATE database. |
static int |
MODE_USE_PREVIOUS_SEARCH
Search Modes for catXSSearch method mode parameter
Use the document set established by the previous search. |
static int |
XS_ALLOCERROR
Catalog Search Error Codes |
static int |
XS_BADHANDLE
Catalog Search Error Codes |
com.doclinx.ftxml.CatalogManager |
xs_catalog
Internal Use Only |
static int |
XS_CATERROR
Catalog Search Error Codes |
static int |
XS_CATOPEN
Catalog Search Error Codes |
static int |
XS_CLOSERROR
Catalog Search Error Codes |
static int |
XS_CONTEXTERROR
Catalog Search Error Codes |
static int |
XS_DBOPEN
Catalog Search Error Codes |
long |
xs_docs
|
static int |
XS_ERROR
Catalog Search Error Codes |
com.doclinx.ftxml.Thes[] |
xs_fuzzy
Internal Use Only |
static int |
XS_FUZZYOPEN
Catalog Search Error Codes |
long |
xs_hits
|
static int |
XS_INITERROR
Catalog Search Error Codes |
static java.lang.String |
XS_LOG_FILENAME
Log file name |
static int |
XS_LOGICERROR
Catalog Search Error Codes |
static int |
XS_NODB
Catalog Search Error Codes |
static int |
XS_NODOCS
Catalog Search Error Codes |
static int |
XS_NOHITDATA
Catalog Search Error Codes |
static int |
XS_NOPRIMARY
Catalog Search Error Codes |
static int |
XS_NORESULTS
Catalog Search Error Codes |
static int |
XS_NOUPDATE
Catalog Search Error Codes |
static int |
XS_OBSOLETE
Catalog Search Error Codes |
static int |
XS_PARMERROR
Catalog Search Error Codes |
static int |
XS_PATHNOTFOUND
Catalog Search Error Codes |
static int |
XS_PRM
Indicator for primary portions of a catalog. |
static int |
XS_RELTAG
Catalog Search Error Codes |
static int |
XS_RSERROR
Catalog Search Error Codes |
static int |
XS_RSQUERY
Catalog Search Error Codes |
static int |
XS_RSSEARCH
Catalog Search Error Codes |
static int |
XS_SELECTERROR
Catalog Search Error Codes |
com.doclinx.ftxml.Thes[] |
xs_stem
Internal Use Only |
static int |
XS_STEMOPEN
Catalog Search Error Codes |
static int |
XS_SUCCESS
Catalog Search Error Returns. |
com.doclinx.ftxml.Thes |
xs_thes
Internal Use Only |
static int |
XS_THESOPEN
Catalog Search Error Codes |
static int |
XS_UNKNOWN
Catalog Search Error Codes |
static int |
XS_UPD
Indicator for update portions of a catalog. |
static int |
XS_WORDEXISTS
Catalog Search Error Codes |
Constructor Summary | |
CatalogSearch()
API: Constructor for CatalogSearch Object. |
Method Summary | |
static void |
catXSClearCache(java.lang.String sPath)
|
static void |
catXSClearEntireCache()
|
void |
catXSClearSearch(boolean reload)
API: Clears buffered search hits -- this is to reduce memory use after a search AND building of document search result list. |
void |
catXSClose()
API: Closes CatalogSearch object and releases any resources. |
java.lang.String |
catXSContextXPath(int docId,
char contextId)
API: Return the string denoting the XPATH where a match (hit) occurred. |
static void |
catXSFinish()
API: Close all outstanding CatalogSearch objects that are OPEN. |
com.doclinx.jftr.FTR |
catXSFTRInfo(com.doclinx.jftr.RS_DBH[] dbh)
API: Returns low-level FTR handle. |
java.lang.String |
catXSGetAlts(int mode,
java.lang.String symbol)
API: Retrieve alternate word list via supported methods. |
com.doclinx.ftxml.CatalogManager |
catXSGetCatalog()
API: Return CatalogManager handle associated with this search object. |
com.doclinx.jftr.DOCHIT |
catXSGetDoc(long index)
API: Retrieves one of the document number (catalog entry) and total number of matches from a set of search results. |
long |
catXSGetDocCount()
API: Retrieve the number of documents found in the last search. |
com.doclinx.jftr.DOCHIT[] |
catXSGetDocList(int start,
int nItems)
API: Retrieves many of the document number (catalog entry) and total number of matches from a set of search results. |
long |
catXSGetDocMax()
API: Retrieve the current active number of documents in the catalog. |
long |
catXSGetDocMax(int mode)
API: Retrieve the maximum Document ID (catalog entry #) for the primary, update, or both databases. |
int |
catXSGetExtendedError()
API: Return extended error code, refining errors for query or search. |
java.lang.String |
catXSGetHF(long docId)
API: Create PDF Highlight File Format for a given document hit. |
long |
catXSGetHitCount()
API: Retrieve the total number of hits matching the last search query. |
int |
catXSGetHitsReturned()
API: Returns the number of hits from last search AND then releases search result objects. |
com.doclinx.jftr.DOCHIT[] |
catXSGetRelevancyList(int start,
int nItems)
API: Retrieves many of the document # (catalog entry) and relevancy # from a set of search results. |
java.util.Vector |
catXSGetSearchTerms()
API: Retrieves symbol and other data from boolean query as Vector of String or NodeInfo objects. |
long |
catXSGetSearchTime()
API: Retrieve time required for last search (in milleseconds). |
com.doclinx.jftr.DOCHIT[] |
catXSGetSortedDocList(int start,
int nItems,
int key)
API: Retrieves a selected # of document hits in sorted order; the document hit set may be sorted by any item in a catalog entry. |
com.doclinx.jftr.RDOCHIT[] |
catXSGetSortedDocList(int start,
int nItems,
java.lang.String[] attrs)
API: Retrieves a selected # of document hits in sorted order; the document hit set can be sorted by an entry's set of metadata attributes. |
java.util.Vector |
catXSHitList(int[] aaList,
int start,
int nItems)
API: Retrieve the hit list(word location) Vector resulting from a search. |
boolean |
catXSIsObsolete()
API: Checks to to if search catalog has been updated. |
static void |
catXSMaxDocList(int maxSize)
API: Sets the maximum number of DOCHIT objects for in-memory storage. |
void |
catXSOpen(java.lang.String sPath,
java.lang.String sName)
API: Open a CatalogSearch object on an existing catalog. |
void |
catXSSearch(java.lang.String sQuery,
int mode)
API: Search an opened catalog based upon query string and mode of operation. |
void |
catXSSearchAbort()
API: Asynchronous abort for current search (running in another thread) |
void |
catXSSerial(com.doclinx.ftxml.XS_SYNC sync)
|
static void |
catXSSetLocLimit(int limit)
API: Sets upper limit for unique words in wildcard or range seaches. |
void |
catXSSetLog(com.doclinx.jftr.Log sLog)
API: Set logger. |
void |
catXSSetLogFile(java.lang.String sFileName,
int level)
API: Set logging file and severity level for class error reporting. |
void |
catXSSetRelevancyTags(int val,
java.lang.String tag)
API: Set multiplier for highly relevant tags (e.g. |
java.util.Vector |
catXSSpellSuggest(int mode,
java.lang.String symbol)
API: Retrieve alternate word list via supported methods. |
java.util.Vector[] |
catXSWildLookup(com.doclinx.jftr.DOCHIT[] dh,
java.lang.String sep)
API: Retrieve a vector array of String, each vector element containing the actual word match from a search query containing wildcards one vector per document in the hashtable See CatXSSearch for performing search.
|
void |
catXSWildLookup(java.util.Hashtable ht,
java.lang.String sep,
java.util.Vector[] v)
API: Retrieve a vector array of String, each vector element containing the actual word match from a search query containing wildcards one vector per document in the hashtable See CatXSSearch for performing search.
|
java.util.Vector |
catXSWildLookup(long docId,
java.lang.String sep)
API: Retrieve a vector of String, each element containing the actual word match from a search query containing wildcards. |
static int |
DOC(char[] aaList)
API: Construct DocId from attribute array values. |
static int |
DOC(char doc,
char hiDoc)
API: Construct DocId from attribute array values. |
static java.lang.String |
explain(int iStatus)
Explains catalog search error (always long version). |
static java.lang.String |
explain(int iStatus,
boolean bLong)
Explains catalog search error. |
void |
finalize()
Override default finalize to ensure catalog search handle closed. |
int |
getMaxRelevancy()
Returns maximum relevancy value found in last search. |
java.lang.String |
getName()
|
java.lang.String |
getQuery()
|
void |
intCatXSClose()
INTERNAL USE ONLY. |
void |
intCatXSOpen(com.doclinx.jftr.BLList del)
INTERNAL USE ONLY. |
static boolean |
PRM(int mode)
Helper function to determine if MODE_PRM bit set |
static void |
setHCache(boolean set)
|
void |
setName(java.lang.String name)
|
static boolean |
UPD(int mode)
Helper function to determine if MODE_UPD bit set |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int XS_PRM
public static final int XS_UPD
public static final java.lang.String XS_LOG_FILENAME
public static final int FOLD_DIGIT
CatXSSearch
mode parameter.
See also MODE_PRM
for mode settings.
public static final int FOLD_LATIN
mode
setting.
public static final int XS_SUCCESS
XS_SUCCESS - No error XS_ERROR - General error. XS_INITERROR - Unable to initialize search library (missing DB files). XS_PARMERROR - Bad parameter values (range or null) to search function. XS_CATOPEN - Unable to open CatalogManager handle, bad path or missing catalog. XS_DBOPEN - Unable to open database handle in catalog (.prm or .upd files). XS_BADHANDLE - CatalogSearch object not initialized or opened. XS_RSERROR - Search library error. Seeerror function
for more details. XS_RSQUERY - Bad query for catXSSearch. Seeerror function
for more details. XS_NOUPDATE - Attempt to search just update database and update does not exist. XS_NOPRIMARY - Attempt to search primary with no index data. XS_NORESULTS - Request for results when no search performed or empty search (e.g. catXSGetDoc method). XS_NODB - Attempt to open database that has not been indexed. XS_CLOSERROR - Error closing CatalogManager object. XS_CATERROR - **deprecated. XS_LOGICERROR - **deprecated. XS_ALLOCERROR - **deprecated. XS_CONTEXTERROR - Unable to open context handle. XS_THESOPEN - Unable to open Thesaurus object. XS_STEMOPEN - Unable to open Stemming map object. XS_FUZZYOPEN - Unable to open Fuzzy lookup object. XS_SELECTERROR - Search library error. Seeerror function
for more details. XS_OBSOLETE - **deprecated XS_NODOCS - No documents in database. (all deleted). XS_RSSEARCH - Search error (but not query format error). Seeerror function
for more details. XS_RELTAG - Error in tag lookup for relvancy weighting. XS_PATHNOTFOUND - No context or context not found for given ID. XS_NOHITDATA - Document not PDF or no hit data collected. XS_UNKNOWN - Unexpected error in CatalogSearch method.
public static final int XS_ERROR
public static final int XS_INITERROR
public static final int XS_PARMERROR
public static final int XS_CATOPEN
public static final int XS_DBOPEN
public static final int XS_BADHANDLE
public static final int XS_RSERROR
public static final int XS_RSQUERY
public static final int XS_NOUPDATE
public static final int XS_NOPRIMARY
public static final int XS_NORESULTS
public static final int XS_NODB
public static final int XS_CLOSERROR
public static final int XS_CATERROR
public static final int XS_LOGICERROR
public static final int XS_ALLOCERROR
public static final int XS_CONTEXTERROR
public static final int XS_THESOPEN
public static final int XS_STEMOPEN
public static final int XS_FUZZYOPEN
public static final int XS_SELECTERROR
public static final int XS_OBSOLETE
public static final int XS_NODOCS
public static final int XS_RSSEARCH
public static final int XS_RELTAG
public static final int XS_PATHNOTFOUND
public static final int XS_NOHITDATA
public static final int XS_WORDEXISTS
public static final int XS_UNKNOWN
public static final int MODE_PRM
public static final int MODE_UPD
public static final int MODE_BOTH
public static final int MODE_PLURAL
public static final int MODE_FUZZY
public static final int MODE_STEM
public static final int MODE_THES
public static final int MODE_ALTWORD
public static final int MODE_ANDORMODE
mode
parameter
Search Operation. Conduct AND operations as follows:
For "AND" operations where both terms occur, include ALL
terms matching either term within document. Normal AND
mode normally includes only the "MIN" term of the two.
public static final int MODE_NOXPATHOK
mode
parameter
Enable/Disable error return when xpath not found.
public static final int MODE_USE_PREVIOUS_SEARCH
mode
parameter
Use the document set established by the previous search.
public static final int MODE_RELEVANCY
mode
parameter
Search Order. Order results by relevancy ranking.
public static final int MODE_FOLD_DIGIT
mode
parameter.
MODE_FOLD_DIGIT: Fold all digit chars to base to 0..9 MODE_FOLD_LATIN: Fold Latin accented chars to base 26 letter set Character folding modes (Note: Must be > 0x2000)'
public static final int MODE_FOLD_LATIN
mode
parameter.
public static final int MODE_SUBDELS
mode
parameter.
Also see values
for other mode settings.
Note: Mode values for catXSGetDocMax can ONLY include MODE_PRM,
MODE_UPD, MODE_BOTH and MODE_SUBDELS
public static final int MODE_NODEINFO
mode
parameter.
Return vector of NodeInfo for each query node. (default Symbols)
public static final int MODE_PHRASES
mode
parameter.
Return vector of Strings (terms AND phrases)
public com.doclinx.ftxml.CatalogManager xs_catalog
public long xs_docs
public long xs_hits
public com.doclinx.ftxml.Thes xs_thes
public com.doclinx.ftxml.Thes[] xs_stem
public com.doclinx.ftxml.Thes[] xs_fuzzy
public boolean bObsolete
Constructor Detail |
public CatalogSearch()
Method Detail |
public void setName(java.lang.String name)
public java.lang.String getName()
public java.lang.String getQuery()
public int getMaxRelevancy()
catXSGetSortedDocList
on sorting details.
public static java.lang.String explain(int iStatus)
iStatus
- CatalogSearch error code.
public static java.lang.String explain(int iStatus, boolean bLong)
iStatus
- CatalogSearch error code.bLong
- If true
, return long version of error.
public static void setHCache(boolean set)
public static void catXSClearEntireCache()
public static void catXSClearCache(java.lang.String sPath)
public static boolean PRM(int mode)
mode
- Mode field bit to check to see if primary database.
true
if primary DB bit set.public static boolean UPD(int mode)
mode
- Mode field bit to check to see if update database.
true
if update DB bit set.public void finalize()
finalize
in class java.lang.Object
public void catXSOpen(java.lang.String sPath, java.lang.String sName) throws CatalogSearchException
sPath
- Directory path of exisiting catalog group.sName
- Sub-directory name of specific catalog to open.
CatalogSearchException
- See constant
definitions.public void intCatXSOpen(com.doclinx.jftr.BLList del) throws CatalogSearchException
CatalogSearchException
public void catXSClose() throws CatalogSearchException
CatalogSearchException
- See constant
definitions.public void intCatXSClose() throws CatalogSearchException
CatalogSearchException
public void catXSSearch(java.lang.String sQuery, int mode) throws CatalogSearchException
See TeraXML Query Syntax for query format specification.
sQuery
- Simple boolean query string for specifying search.mode
- Specifies which DB to search and other search options.
See MODE_PRM
for start of discussion about search modes and options.
CatalogSearchException
- See constant
definitions.public java.util.Vector catXSGetSearchTerms() throws CatalogSearchException
See catXSSearch
for details of search function.
NodeInfo
constant setting.Phrases
constant setting.
CatalogSearchException
- See constant
definitions.public com.doclinx.jftr.DOCHIT catXSGetDoc(long index) throws CatalogSearchException
See CatXSSearch
for performing search.
index
- Indicates which item in the search set to access. Range
1..N, where N is the total number of search results in set.
DOCHIT
contains document id and number of hits.
CatalogSearchException
- See constant
definitions.
See catXSGetDocCount
for maximum # hits N.public com.doclinx.jftr.DOCHIT[] catXSGetDocList(int start, int nItems) throws CatalogSearchException
SeeCatXSSearch
for performing search. SeecatXSGetDocCount
for maximum # hits N.
start
- Indicates first item to access in the search set. Range
1..N, where N is the total number of search results
in the set.nItems
- The total number of items to retrieve. This number must be
less then the remaining items in set, from start index.
DOCHIT
contains document id and number of hits.
CatalogSearchException
- See constant
definitions.public com.doclinx.jftr.DOCHIT[] catXSGetRelevancyList(int start, int nItems) throws CatalogSearchException
SeeCatXSSearch
for performing search. SeecatXSGetDocCount
for maximum # hits N. SeecatXSSetRelevancyTags
to set relevancy weights for tags and attributes.
start
- Indicates first item to access in the search set.
Range 1..N, where N is the total number of search
results in set.nItems
- The total number of items to retrieve. This number
must be less then the remaining items in set, from start index.
DOCHIT
array where each object contains document id and
relevancy # (relevancy value returned in hitCount field).
CatalogSearchException
- See constant
definitions.public com.doclinx.jftr.DOCHIT[] catXSGetSortedDocList(int start, int nItems, int key) throws CatalogSearchException
SeeCatXSSearch
for performing search. SeecatXSGetDocCount
for maximum # hits N.
start
- Indicates first item to access in the search set.
Range 1..N, where N is the total number of search
results in set.nItems
- The total number of items to retrieve. This number
must be less then the remaining items in set, from start index.key
- The field number to sort. Must be in the range
of catalog items (see CRIDS
: Catalog Record Component IDs for values). Note that for
the LAST field CAT_AUXINFO, the upper 16-bits of key can contain
a sub-field value (0..5) for the text components of this field.
(Use 0xffff for sub-field to sort by entire item).
DOCHIT
array where each object contains document id and
number of hits.
CatalogSearchException
- See constant
definitions.public com.doclinx.jftr.RDOCHIT[] catXSGetSortedDocList(int start, int nItems, java.lang.String[] attrs) throws CatalogSearchException
SeeCatXSSearch
for performing search. SeecatXSGetDocCount
for maximum # hits N.
start
- Indicates first item to access in the search set.
Range 1..N, where N is the total number of search
results in set.nItems
- The total number of items to retrieve. This number
must be less then the remaining items in set, from start index.attrs
- An array of String giving the metadata attribute names
by which to sort. Type information can be specified by
setting tag semantics in the catalog handle or by following a
naming convention. Special pseudo names also allow for sorting
by relevancy, hits, or catalog field item.
Naming conventions:
- If an attribute names starts with '-', then the sort
order is reversed (descending). Can be used to precede
other leading sequences or with semantic typing.
t_ Attribute value is text, but ignore case differences.
r_ Attribute value is 32-bit floating number.
i_ Attribute value is 32-bit integer number.
d_ Attribute value is date. If the catalog SRC2STF_PARMS
sr_dateFormats list is set, these date formats will be
used.
!REL
A Pseudo-name for an attribute. This indicates that the
sort key will be the relevancy number, not an actual meta-
data attribute (e.g. !rel or !RELEVANCY both are acceptable)
Note that MODE_RELEVANCY must be set in the prior search
to get the relevancy metric else this will just sort by hit
count.
!HIT
Sort by number of hits in the document.
!FLD[n]
A Pseudo-name for an attribute indicating catalog entry field.
Note [n] is a 1 to n digit value indicating the catalog
field number to sort. The field number must be in the range
of catalog items (see CRIDS
: Catalog Record Component IDs for values). Note that for
the LAST field CAT_AUXINFO, the upper 16-bits of key can contain
a sub-field value (0..5) for the text components of this field.
(Use 0xffff for sub-field to sort by entire item).
Numeric values for the currently defined fileds are:
CAT_FILENAME = 0 // Catalog key, usually path of file.
CAT_ATTRS = 1 // Attributes (not useful for sort)
CAT_DATE1 = 2; // Not used (not useful for sort)
CAT_DATE2 = 3; // Not used (not useful for sort)
CAT_DATE3 = 4; // Last Modified date.
CAT_INFO = 5; // URL Data
CAT_FILETYPE = 6; // Numeric file type (text, XML, PDF, etc.)
CAT_FILEOFFSET = 7; // file offset (not useful for sort)
CAT_FILESIZE = 8; // Size of document object in bytes.
CAT_AUXINFO = 9; // Extra text. Composed of 6 sub-fields.
// Can sort by entire field or by one
// of the subfields:
0: TITLE, 1: ABSTRACT, 2: ENCODING, 3: ALT_TITLE
4: ADDED_TEXT, METADATA : 5, Entire field: 0xffff
-- Metadata should be sorted using metdata attribute
names, not with sub-field 5! (e.g. "/doc/lmd/@date")
-- [n] can be decimal or hex digits (e.g. 0xffff0001)
Notes.
1. All other named attributes are assumed by default to be case
sensitive text data (Unless a semantic has been defined for
the fully qualified tag).
2. catSetXMLSemantics() can be used to set the 'type'
of a node. These will override the naming conventions
above.
3. A leading root '/' slash is ignored.
Examples:
attrs[0] = "local/@r_money" --> Sort by attr r_money
assume type is float format.
OR
attrs[0] = "local/@d_date" --> Primary sort by attr d_date,
assume type is date format.
attrs[1] = "local/@i_count" --> Secondary sort on int i_count.
assume type is integer format.
OR
attrs[0] = "!REL" --> Primary sort by relevancy.
attrs[1] = "!FLD4" --> Secondary sort by file write
(modified) date (from catalog).
attrs[2] = "local/@i_count" --> Tertiary sort by int i_count.
assume type is integer format.
RDOCHIT
array where each object contains document id and
number of hits.
CatalogSearchException
- See constant
definitions.public java.util.Vector catXSHitList(int[] aaList, int start, int nItems) throws CatalogSearchException
Attribute Array Index Values: STF_DOCUMENT = 0; STF_DOCUMENT_HI = 1; STF_DOCUMENT_PRIME = 2; STF_PARAGRAPH = 3; STF_PARAGRAPH_HI = 4; STF_PARAGRAPH_PRIME = 5; STF_WORD = 6; STF_TITLE_LEVELS = 7; STF_ATTRIBUTE8 = 8; STF_ATTRIBUTE9 = 9; STF_ATTRIBUTE10 = 10; STF_ATTRIBUTE11 = 11; STF_ATTRIBUTE12 = 12; STF_ATTRIBUTE13 = 13; // Context Instance (LO) STF_ATTRIBUTE14 = 14; // Context Instance (HI) STF_ATTRIBUTE15 = 15; // Context ID STF_FLAGS = 16; ---------------------------- Example call: aaList[0] = STF_TOKEN.STF_DOCUMENT; aaList[1] = STF_TOKEN.STF_DOCUMENT_HI; aaList[2] = STF_TOKEN.STF_PARAGRAPH; aaList[3] = STF_TOKEN.STF_PARAGRAPH_HI; aaList[4] = STF_TOKEN.STF_WORD; aaList[5] = STF_TOKEN.STF_ATTRIBUTE15; aaVector = catXSHitList(aaList, 1, N); aaHit = (char []) aaResult.ElementAt(i) Then each hit object in return Vector would be a char[6] with docId = aaHit[0] + ((int) aaHit[1]) << 16); parNo = aaHit[2] + ((int) aaHit[3]) << 16); wrdNo = aaHit[4]; contextId = aaHit[5]; SeeCatXSSearch
for performing search. SeecatXSGetDocCount
for maximum # hits N. Note that the size of the result vector is in the extended error value for SUCCESSFUL operations.
aaList
- Array of integer indexes specifying attribute array data to return.start
- Indicates which item in the search set with which to start.
Range 1..N, where N is the total number of hit results
in set.nItems
- The total number of items to retrieve.
CatalogSearchException
- See constant
definitions.public java.util.Vector catXSWildLookup(long docId, java.lang.String sep) throws CatalogSearchException
CatXSSearch
for performing search.
See catXSGetDocCount
for maximum # hits N.
docId
- Document id indicating the specific match for a wildcard.sep
- If null, just return matching sym (word). Else, return
the wildcard string, the string "sep", and the actual match.
CatalogSearchException
- See constant
definitions.public java.util.Vector[] catXSWildLookup(com.doclinx.jftr.DOCHIT[] dh, java.lang.String sep) throws CatalogSearchException
CatXSSearch
for performing search.
See catXSGetDocCount
for maximum # hits N.
dh
- DOCHIT array of documents to match wildcard hitssep
- If null, just return matching sym (word). Else, return
the wildcard string, the string "sep", and the actual match.
CatalogSearchException
- See constant
definitions.public void catXSWildLookup(java.util.Hashtable ht, java.lang.String sep, java.util.Vector[] v) throws CatalogSearchException
CatXSSearch
for performing search.
See catXSGetDocCount
for maximum # hits N.
ht
- Integer hashtable containing doc# to element in result arraysep
- If null, just return matching sym (word). Else, return
the wildcard string, the string "sep", and the actual match.v
- Array of Vectors, each vector contining String exact matches.
CatalogSearchException
- See constant
definitions.public java.lang.String catXSContextXPath(int docId, char contextId) throws CatalogSearchException
For example, obtain JUST the context ID for the ith hit: aaList[0] = STF_TOKEN.STF_DOCUMENT; aaList[1] = STF_TOKEN.STF_DOCUMENT_HI; aaList[2] = STF_ATTRIBUTE15; // Context ID aaVec = catXSHitList(aaList, 1, N); aaHit = (char []) aaResult.ElementAt(i) docId = aaHit[0] + ((int) aaHit[1]) << 16); contextId = aaHit[2]; And then obtain the XPATH for that hit: String xpath = catXSContextXPath(contextId);See
CatXSSearch
for performing search.
See catXSHitList
for obtaining the
contextId of a hit.
docId
- Document # from hitlist item returned by catXSHitList().contextId
- Context ID obtained from hitList item returned by catXSHitList().
CatalogSearchException
- See constant
definitions.public long catXSGetDocCount() throws CatalogSearchException
See CatXSSearch
for performing search.
CatalogSearchException
- See constant
definitions.public long catXSGetHitCount() throws CatalogSearchException
SeeCatXSSearch
for performing search. SeecatXSHitList
for accessing the hit list.
CatalogSearchException
- See constant
definitions.public long catXSGetDocMax(int mode) throws CatalogSearchException
SeeMODE_SUBDELS
for omitting deleted entries. Seemode
DB selects for specifying database(s).
mode
- Control which maximum value to return.
CatalogSearchException
- See constant
definitions.public long catXSGetDocMax() throws CatalogSearchException
CatalogSearchException
- See constant
definitions.public long catXSGetSearchTime() throws CatalogSearchException
See CatXSSearch
for performing search.
CatalogSearchException
- See constant
definitions.public int catXSGetExtendedError() throws CatalogSearchException
SeeQERR
for query error codes when exception error is XS_RSQUERY. SeeRS_STATUS
for all other extended codes
CatalogSearchException
- See constant
definitions.
(returns only search system errors: XS_RSERROR, XS_SELECTERROR, XS_RSSEARCH).public void catXSSetLogFile(java.lang.String sFileName, int level) throws CatalogSearchException
sFileName
- Fully qualified path name of log file. If null,
just set the current level.level
- Debug severity level. See severity
settings.
CatalogSearchException
- See constant
definitions.public void catXSSetLog(com.doclinx.jftr.Log sLog) throws CatalogSearchException
sLog
- Opened logger.
CatalogSearchException
- See constant
definitions.public com.doclinx.ftxml.CatalogManager catXSGetCatalog() throws CatalogSearchException
See CatalogManager
for access methods.
CatalogSearchException
- See constant
definitions.public static void catXSFinish() throws CatalogSearchException
See CatalogSearch.catXSOpen
method.
CatalogSearchException
- See constant
definitions.public int catXSGetHitsReturned() throws CatalogSearchException
See catXSGetHitCount
for more information.
CatalogSearchException
- See constant
definitions.public static int DOC(char doc, char hiDoc)
See catXSHitList
for accessing the hit list.
doc
- Low 16-bits of document IDhiDoc
- Upper 16-bits of document ID
public static int DOC(char[] aaList)
See catXSHitList
for accessing the hit list.
aaList
- aa list with 1st to items containing DOC information.
public void catXSSetRelevancyTags(int val, java.lang.String tag) throws CatalogSearchException
SeecatXSSearch mode
parameter to do relevancy search. SeeMODE_RELEVANCY
mode for value to enable relevancy. SeecatXSGetRelevancyList
for search results.
val
- relevancy multiplier (0..16)tag
- XPath of tag expression or special value:
"<TITLE>": If hit has attr array[7] set (title), use multipler. (default is 8) This is used primarily for HTML or user specified titles in text docuemnts. "<PROX>" : If proximity used, then weight terms in proximity by multipler. (default is 2) "<EXACT>": If words in exact order as, weight with multiplier. (default is 4)
CatalogSearchException
- See constant
definitions.public boolean catXSIsObsolete() throws CatalogSearchException
CatalogSearchException
- See constant
definitions.public com.doclinx.jftr.FTR catXSFTRInfo(com.doclinx.jftr.RS_DBH[] dbh) throws CatalogSearchException
dbh
- Database handles for primary and update
CatalogSearchException
- See constant
definitions.public java.lang.String catXSGetHF(long docId) throws CatalogSearchException
docId
- The document to get the hit highlight XML.
CatalogSearchException
- See constant
definitions.public static void catXSSetLocLimit(int limit)
(Adjust limit for BLM exception 2)
limit
- New upper limit (default 16384)public void catXSSerial(com.doclinx.ftxml.XS_SYNC sync) throws java.lang.Exception
java.lang.Exception
public java.lang.String catXSGetAlts(int mode, java.lang.String symbol) throws CatalogSearchException
NOTE: Any/all of the 4 lists can be combined together (e.g. plura/fuzzy).
mode
- Specifies which DB and alternative list(s) to use.
See MODE_PRM
for start of discussion about search modes and options.symbol
- The word to find to create a set of alias words.
CatalogSearchException
- See constant
definitions.public java.util.Vector catXSSpellSuggest(int mode, java.lang.String symbol) throws CatalogSearchException
NOTE: Any/all of the 4 lists can be combined together (e.g. plura/fuzzy).
mode
- Specifies which DB and alternative list(s) to use.
See MODE_PRM
for start of discussion about search modes and options.symbol
- The word to find to create a set of alias words.
CatalogSearchException
- See constant
definitions.public void catXSSearchAbort()
public void catXSClearSearch(boolean reload)
reload
- Redo search if required by another call else PERMANTENTLY
discard search results.public static void catXSMaxDocList(int maxSize)
maxSize
- Maximum # of DOCHITs to hold in memory.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |